#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QTcpSocket>
#include <QHostAddress>
#include <QNetworkDatagram>
#include <stdio.h>

#define		video_width		640
#define 	video_height	480

namespace Ui {
class Widget;
}

typedef struct Frame_Buffer{
    unsigned char*buf[video_width*video_height*3];
    int length;
}FrameBuffer;

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();

    // QUdpSocket *UdpClient;


    void Senddata_SLOT();

private slots:
    void on_push_open_clicked();
    void on_push_close_clicked();
    void on_push_open_2_clicked();
    void connected_SLOT();
    void readyRead_SLOT();

private:
    Ui::Widget *ui;
    QString ipdata;
    QTcpSocket *Clien_socket;
    QString IP="8.134.100.90"; //服务端IP
    int Port=1900;             //服务端端口
};

#endif // WIDGET_H
